/*
 * Copyright (c) 2025 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include "Audio1Test.h"
#include "AudioEnumTest.h"
#include "AudioTest.h"
#include <js_native_api.h>
#include <js_native_api_types.h>
#include <node_api.h>

napi_property_descriptor desc[] = {
    {"AudioCaptureStartInvalidParam", nullptr, AudioCaptureStartInvalidParam, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioCapturePauseInvalidParam", nullptr, AudioCapturePauseInvalidParam, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioCaptureStopInvalidParam", nullptr, AudioCaptureStopInvalidParam, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioCaptureFlushInvalidParam", nullptr, AudioCaptureFlushInvalidParam, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioCaptureGetCurrentStateInvalidParam", nullptr, AudioCaptureGetCurrentStateInvalidParam, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioCaptureGetLatencyModeInvalidParam", nullptr, AudioCaptureGetLatencyModeInvalidParam, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioCaptureGetStreamIdInvalidParam", nullptr, AudioCaptureGetStreamIdInvalidParam, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioCaptureGetSamplingRateInvalidParam", nullptr, AudioCaptureGetSamplingRateInvalidParam, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioCaptureGetChannelCountInvalidParam", nullptr, AudioCaptureGetChannelCountInvalidParam, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioCaptureGetSampleFormatInvalidParam", nullptr, AudioCaptureGetSampleFormatInvalidParam, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioCaptureGetEncodingTypeInvalidParam", nullptr, AudioCaptureGetEncodingTypeInvalidParam, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioCaptureGetCapturerInfoInvalidParam", nullptr, AudioCaptureGetCapturerInfoInvalidParam, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioCaptureGetFrameSizeInCallbackInvalidParam", nullptr, AudioCaptureGetFrameSizeInCallbackInvalidParam, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioCaptureGetTimestampInvalidParam", nullptr, AudioCaptureGetTimestampInvalidParam, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioCaptureGetFramesReadInvalidParam", nullptr, AudioCaptureGetFramesReadInvalidParam, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioCaptureGetOverflowCountInvalidParam", nullptr, AudioCaptureGetOverflowCountInvalidParam, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioRendererStartInvalidParam", nullptr, AudioRendererStartInvalidParam, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioRendererPauseInvalidParam", nullptr, AudioRendererPauseInvalidParam, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioRendererStopInvalidParam", nullptr, AudioRendererStopInvalidParam, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioRendererFlushInvalidParam", nullptr, AudioRendererFlushInvalidParam, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioRendererGetCurrentStateInvalidParam", nullptr, AudioRendererGetCurrentStateInvalidParam, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioRendererGetSamplingRateInvalidParam", nullptr, AudioRendererGetSamplingRateInvalidParam, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioRendererGetStreamIdInvalidParam", nullptr, AudioRendererGetStreamIdInvalidParam, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioRendererGetChannelCountInvalidParam", nullptr, AudioRendererGetChannelCountInvalidParam, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioRendererGetSampleFormatInvalidParam", nullptr, AudioRendererGetSampleFormatInvalidParam, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioRendererGetLatencyModeInvalidParam", nullptr, AudioRendererGetLatencyModeInvalidParam, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioRendererGetRendererInfoInvalidParam", nullptr, AudioRendererGetRendererInfoInvalidParam, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioRendererGetEncodingTypeInvalidParam", nullptr, AudioRendererGetEncodingTypeInvalidParam, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioRendererGetFramesWrittenInvalidParam", nullptr, AudioRendererGetFramesWrittenInvalidParam, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioRendererGetTimestampInvalidParam", nullptr, AudioRendererGetTimestampInvalidParam, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioRendererGetTimestampIllegalState", nullptr, AudioRendererGetTimestampIllegalState, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioRendererGetFrameSizeInCallbackInvalidParam", nullptr, AudioRendererGetFrameSizeInCallbackInvalidParam,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"AudioRendererGetSpeedInvalidParam", nullptr, AudioRendererGetSpeedInvalidParam, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioRendererSetSpeedInvalidParam", nullptr, AudioRendererSetSpeedInvalidParam, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioRendererSetVolumeInvalidParam", nullptr, AudioRendererSetVolumeInvalidParam, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioRendererSetVolumeSuccess", nullptr, AudioRendererSetVolumeSuccess, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioRendererSetVolumeWithRampInvalidParam", nullptr, AudioRendererSetVolumeWithRampInvalidParam, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioRendererSetVolumeWithRampSuccess", nullptr, AudioRendererSetVolumeWithRampSuccess, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioRendererGetVolumeInvalidParam", nullptr, AudioRendererGetVolumeInvalidParam, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioRendererGetVolumeSuccess", nullptr, AudioRendererGetVolumeSuccess, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioRendererSetMarkPositionInvalidParam", nullptr, AudioRendererSetMarkPositionInvalidParam, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioRendererSetMarkPositionSuccess", nullptr, AudioRendererSetMarkPositionSuccess, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioRendererCancelMarkInvalidParam", nullptr, AudioRendererCancelMarkInvalidParam, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioRendererCancelMarkSuccess", nullptr, AudioRendererCancelMarkSuccess, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioRendererGetUnderflowCountInvalidParam", nullptr, AudioRendererGetUnderflowCountInvalidParam, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioRendererGetUnderflowCountSuccess", nullptr, AudioRendererGetUnderflowCountSuccess, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioRendererGetChannelLayoutInvalidParam", nullptr, AudioRendererGetChannelLayoutInvalidParam, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioRendererGetChannelLayoutSuccess", nullptr, AudioRendererGetChannelLayoutSuccess, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioRendererGetEffectModeInvalidParam", nullptr, AudioRendererGetEffectModeInvalidParam, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioRendererGetEffectModeSuccess", nullptr, AudioRendererGetEffectModeSuccess, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioRendererSetEffectModeInvalidParam", nullptr, AudioRendererSetEffectModeInvalidParam, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioRendererSetEffectModeSuccess", nullptr, AudioRendererSetEffectModeSuccess, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioRendererGetRendererPrivacyInvalidParam", nullptr, AudioRendererGetRendererPrivacyInvalidParam, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioRendererSetSilentModeAndMixWithOthersInvPar", nullptr, AudioRendererSetSilentModeAndMixWithOthersInvPar,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"AudioRendererSetSilentModeAndMixWithOthersSuccess", nullptr, AudioRendererSetSilentModeAndMixWithOthersSuccess,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"AudioRendererGetSilentModeAndMixWithOthersInvPar", nullptr, AudioRendererGetSilentModeAndMixWithOthersInvPar,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"AudioRendererGetSilentModeAndMixWithOthersSuccess", nullptr, AudioRendererGetSilentModeAndMixWithOthersSuccess,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"AudioRendererSetDefaultOutputDeviceInvalidParam", nullptr, AudioRendererSetDefaultOutputDeviceInvalidParam,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"AudioRendererSetDefaultOutputDeviceSuccess", nullptr, AudioRendererSetDefaultOutputDeviceSuccess, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioRendererGetAudioTimestampInfoInvalidParam", nullptr, AudioRendererGetAudioTimestampInfoInvalidParam, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioRendererSetLoudnessGainInvalidParam", nullptr, AudioRendererSetLoudnessGainInvalidParam, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioRendererSetLoudnessGainSuccess", nullptr, AudioRendererSetLoudnessGainSuccess, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioRendererGetLoudnessGainInvalidParam", nullptr, AudioRendererGetLoudnessGainInvalidParam, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioRendererGetLoudnessGainSuccess", nullptr, AudioRendererGetLoudnessGainSuccess, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioStreamSetSampleFormatInvalidParam", nullptr, AudioStreamSetSampleFormatInvalidParam, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioStreamSetEncodingTypeInvalidParam", nullptr, AudioStreamSetEncodingTypeInvalidParam, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioStreamSetLatencyModeInvalidParam", nullptr, AudioStreamSetLatencyModeInvalidParam, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioStreamSetChannelLayoutInvalidParam", nullptr, AudioStreamSetChannelLayoutInvalidParam, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioStreamSetChannelLayoutSuccess", nullptr, AudioStreamSetChannelLayoutSuccess, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioStreamSetRendererInfoInvalidParam", nullptr, AudioStreamSetRendererInfoInvalidParam, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioStreamSetRendererCallbackInvalidParam", nullptr, AudioStreamSetRendererCallbackInvalidParam, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioStreamSetOutDeviceChangeCbInvalidParam", nullptr, AudioStreamSetOutDeviceChangeCbInvalidParam, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioStreamSetCapturerCallbackInvalidParam", nullptr, AudioStreamSetCapturerCallbackInvalidParam, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioStreamSetFrameSizeInCallbackInvalidParam", nullptr, AudioStreamSetFrameSizeInCallbackInvalidParam, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioStreamSetWriteDataMetaCbInvalidParam", nullptr, AudioStreamSetWriteDataMetaCbInvalidParam, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioStreamSetWriteDataMetaCbSuccess", nullptr, AudioStreamSetWriteDataMetaCbSuccess, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioStreamSetRendererInterruptModeInvalidParam", nullptr, AudioStreamSetRendererInterruptModeInvalidParam,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"AudioStreamSetRendererWriteDataCbInvalidParam", nullptr, AudioStreamSetRendererWriteDataCbInvalidParam, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioStreamSetWriteDataCbAdvancedInvalidParam", nullptr, AudioStreamSetWriteDataCbAdvancedInvalidParam, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioStreamSetWriteDataCbAdvancedSuccess", nullptr, AudioStreamSetWriteDataCbAdvancedSuccess, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioStreamSetRendererErrorCallbackSuccess", nullptr, AudioStreamSetRendererErrorCallbackSuccess, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioStreamSetCapturerReadDataCallbackSuccess", nullptr, AudioStreamSetCapturerReadDataCallbackSuccess, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioStreamSetCapturerDeviceChangeCbSuccess", nullptr, AudioStreamSetCapturerDeviceChangeCbSuccess, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioStreamSetCapturerInterruptCallbackSuccess", nullptr, AudioStreamSetCapturerInterruptCallbackSuccess, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioStreamSetCapturerErrorCallbackSuccess", nullptr, AudioStreamSetCapturerErrorCallbackSuccess, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioStreamSetCapturerWillMuteOnIntrptInvalidParam", nullptr, AudioStreamSetCapturerWillMuteOnIntrptInvalidParam,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"AudioStreamEncodingTypeAudioVividCode", nullptr, AudioStreamEncodingTypeAudioVividCode, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioStreamEncodingTypeEAc3Code", nullptr, AudioStreamEncodingTypeEAc3Code, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioDeviceGetDeviceRoleInvalidParam", nullptr, AudioDeviceGetDeviceRoleInvalidParam, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioDeviceGetDeviceRoleSuccess", nullptr, AudioDeviceGetDeviceRoleSuccess, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioDeviceGetDeviceTypeInvalidParam", nullptr, AudioDeviceGetDeviceTypeInvalidParam, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioDeviceGetDeviceTypeSuccess", nullptr, AudioDeviceGetDeviceTypeSuccess, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioDeviceGetDeviceIdInvalidParam", nullptr, AudioDeviceGetDeviceIdInvalidParam, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioDeviceGetDeviceIdSuccess", nullptr, AudioDeviceGetDeviceIdSuccess, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioDeviceGetDeviceNameInvalidParam", nullptr, AudioDeviceGetDeviceNameInvalidParam, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioDeviceGetDeviceNameSuccess", nullptr, AudioDeviceGetDeviceNameSuccess, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioDeviceGetDeviceAddressInvalidParam", nullptr, AudioDeviceGetDeviceAddressInvalidParam, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioDeviceGetDeviceAddressSuccess", nullptr, AudioDeviceGetDeviceAddressSuccess, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioDeviceGetDeviceSampleRatesInvalidParam", nullptr, AudioDeviceGetDeviceSampleRatesInvalidParam, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioDeviceGetDeviceSampleRatesSuccess", nullptr, AudioDeviceGetDeviceSampleRatesSuccess, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioDeviceGetDeviceChannelCountsInvalidParam", nullptr, AudioDeviceGetDeviceChannelCountsInvalidParam, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioDeviceGetDeviceChannelCountsSuccess", nullptr, AudioDeviceGetDeviceChannelCountsSuccess, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioDeviceGetDeviceDisplayNameInvalidParam", nullptr, AudioDeviceGetDeviceDisplayNameInvalidParam, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioDeviceGetDeviceDisplayNameSuccess", nullptr, AudioDeviceGetDeviceDisplayNameSuccess, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioDeviceGetDeviceEncodingTypesInvalidParam", nullptr, AudioDeviceGetDeviceEncodingTypesInvalidParam, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioDeviceGetDeviceEncodingTypesSuccess", nullptr, AudioDeviceGetDeviceEncodingTypesSuccess, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioGetAudioManagerInvalidParam", nullptr, AudioGetAudioManagerInvalidParam, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioGetAudioManagerSuccess", nullptr, AudioGetAudioManagerSuccess, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioGetAudioSceneInvalidParam", nullptr, AudioGetAudioSceneInvalidParam, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioGetAudioSceneSuccess", nullptr, AudioGetAudioSceneSuccess, nullptr, nullptr, nullptr, napi_default, nullptr},
    {"AudioRoutingGetAudioRoutingManagerSuccess", nullptr, AudioRoutingGetAudioRoutingManagerSuccess, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioRoutingGetDevicesInvalidParam", nullptr, AudioRoutingGetDevicesInvalidParam, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioRoutingGetDevicesSuccess", nullptr, AudioRoutingGetDevicesSuccess, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioRoutingGetAvailableDevicesInvalidParam", nullptr, AudioRoutingGetAvailableDevicesInvalidParam, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioRoutingGetAvailableDevicesSuccess", nullptr, AudioRoutingGetAvailableDevicesSuccess, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioRoutingGetPreferredOutputDeviceInvalidParam", nullptr, AudioRoutingGetPreferredOutputDeviceInvalidParam,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"AudioRoutingGetPreferredOutputDeviceSuccess", nullptr, AudioRoutingGetPreferredOutputDeviceSuccess, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioRoutingGetPreferredInputDeviceInvalidParam", nullptr, AudioRoutingGetPreferredInputDeviceInvalidParam,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"AudioRoutingGetPreferredInputDeviceSuccess", nullptr, AudioRoutingGetPreferredInputDeviceSuccess, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioRoutingRegisterDeviceChangeCbInvalidParam", nullptr, AudioRoutingRegisterDeviceChangeCbInvalidParam, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioRoutingRegisterDeviceChangeCbSuccess", nullptr, AudioRoutingRegisterDeviceChangeCbSuccess, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioRoutingUnregisterDeviceChangeCbInvalidParam", nullptr, AudioRoutingUnregisterDeviceChangeCbInvalidParam,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"AudioRoutingUnregisterDeviceChangeCbSuccess", nullptr, AudioRoutingUnregisterDeviceChangeCbSuccess, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioRoutingReleaseDevicesInvalidParam", nullptr, AudioRoutingReleaseDevicesInvalidParam, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioRoutingReleaseDevicesSuccess", nullptr, AudioRoutingReleaseDevicesSuccess, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioRoutingIsMicBlockDetectionSupInvalidParam", nullptr, AudioRoutingIsMicBlockDetectionSupInvalidParam, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioRoutingSetMicBlockStatusCallbackInvalidParam", nullptr, AudioRoutingSetMicBlockStatusCallbackInvalidParam,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"AudioSessionGetAudioSessionManagerSuccess", nullptr, AudioSessionGetAudioSessionManagerSuccess, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioSessionActivateAudioSessionInvalidParam", nullptr, AudioSessionActivateAudioSessionInvalidParam, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioSessionActivateAudioSessionSuccess", nullptr, AudioSessionActivateAudioSessionSuccess, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioSessionActivateAudioSessionIllegalState", nullptr, AudioSessionActivateAudioSessionIllegalState, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioSessionDeactivateAudioSessionInvalidParam", nullptr, AudioSessionDeactivateAudioSessionInvalidParam, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioSessionDeactivateAudioSessionSuccess", nullptr, AudioSessionDeactivateAudioSessionSuccess, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioSessionDeactivateAudioSessionIllegalState", nullptr, AudioSessionDeactivateAudioSessionIllegalState, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioSessionRegisterSessionDeactivatedCbInvPar", nullptr, AudioSessionRegisterSessionDeactivatedCbInvPar, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioSessionRegisterSessionDeactivatedCbSuccess", nullptr, AudioSessionRegisterSessionDeactivatedCbSuccess,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"AudioSessionUnregisterSessionDeactivatedCbInvPar", nullptr, AudioSessionUnregisterSessionDeactivatedCbInvPar,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"AudioSessionUnregisterSessionDeactivatedCbSuccess", nullptr, AudioSessionUnregisterSessionDeactivatedCbSuccess,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"AudioSessionSetSceneInvalidParam", nullptr, AudioSessionSetSceneInvalidParam, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioSessionSetSceneSuccess", nullptr, AudioSessionSetSceneSuccess, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioSessionRegisterStateChangeCbInvalidParam", nullptr, AudioSessionRegisterStateChangeCbInvalidParam, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioSessionRegisterStateChangeCbSuccess", nullptr, AudioSessionRegisterStateChangeCbSuccess, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioSessionUnregisterStateChangeCbInvalidParam", nullptr, AudioSessionUnregisterStateChangeCbInvalidParam,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"AudioSessionUnregisterStateChangeCbSuccess", nullptr, AudioSessionUnregisterStateChangeCbSuccess, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioSessionSetDefaultOutputDeviceInvalidParam", nullptr, AudioSessionSetDefaultOutputDeviceInvalidParam, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioSessionSetDefaultOutputDeviceSuccess", nullptr, AudioSessionSetDefaultOutputDeviceSuccess, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioSessionGetDefaultOutputDeviceInvalidParam", nullptr, AudioSessionGetDefaultOutputDeviceInvalidParam, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioSessionGetDefaultOutputDeviceSuccess", nullptr, AudioSessionGetDefaultOutputDeviceSuccess, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioSessionReleaseDevicesInvalidParam", nullptr, AudioSessionReleaseDevicesInvalidParam, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioSessionReleaseDevicesSuccess", nullptr, AudioSessionReleaseDevicesSuccess, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioSessionRegisterCurOutDevChgCbInvParam", nullptr, AudioSessionRegisterCurOutDevChgCbInvParam, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioSessionRegisterCurOutDevChgCbSuccess", nullptr, AudioSessionRegisterCurOutDevChgCbSuccess, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioSessionUnregisterCurOutDevChgCbInvParam", nullptr, AudioSessionUnregisterCurOutDevChgCbInvParam, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioSessionUnregisterCurOutDevChgCbSuccess", nullptr, AudioSessionUnregisterCurOutDevChgCbSuccess, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioSessionGetDirectPlaybackSupportSuccess", nullptr, AudioSessionGetDirectPlaybackSupportSuccess, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioSessionIsAcousticEchoCancelerSupportedInvPar", nullptr, AudioSessionIsAcousticEchoCancelerSupportedInvPar,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"AudioSessionIsAcousticEchoCancelerSupportedSuc", nullptr, AudioSessionIsAcousticEchoCancelerSupportedSuc, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioStreamDirectPlayBackBitStreamSupportedCode", nullptr, AudioStreamDirectPlayBackBitStreamSupportedCode,
     nullptr, nullptr, nullptr, napi_default, nullptr},
    {"AudioStreamDirectPlayBackPcmSupportedCode", nullptr, AudioStreamDirectPlayBackPcmSupportedCode, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioStreamStateInvalidCode", nullptr, AudioStreamStateInvalidCode, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioStreamStateNewCode", nullptr, AudioStreamStateNewCode, nullptr, nullptr, nullptr, napi_default, nullptr},
    {"AudioStreamStatePreparedCode", nullptr, AudioStreamStatePreparedCode, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioStreamStateRunningCode", nullptr, AudioStreamStateRunningCode, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioStreamStateStoppedCode", nullptr, AudioStreamStateStoppedCode, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioStreamStateReleasedCode", nullptr, AudioStreamStateReleasedCode, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioStreamStatePausedCode", nullptr, AudioStreamStatePausedCode, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioStreamSourceTypeUnprocessedCode", nullptr, AudioStreamSourceTypeUnprocessedCode, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioStreamSourceTypeLiveCode", nullptr, AudioStreamSourceTypeLiveCode, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioStreamEffectDefaultCode", nullptr, AudioStreamEffectDefaultCode, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioStreamFastStatusNormalCode", nullptr, AudioStreamFastStatusNormalCode, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioStreamFastStatusFastCode", nullptr, AudioStreamFastStatusFastCode, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioSceneRingingCode", nullptr, AudioSceneRingingCode, nullptr, nullptr, nullptr, napi_default, nullptr},
    {"AudioScenePhoneCallCode", nullptr, AudioScenePhoneCallCode, nullptr, nullptr, nullptr, napi_default, nullptr},
    {"AudioSceneVoiceChatCode", nullptr, AudioSceneVoiceChatCode, nullptr, nullptr, nullptr, napi_default, nullptr},
    {"AudioRingerModeSilentCode", nullptr, AudioRingerModeSilentCode, nullptr, nullptr, nullptr, napi_default, nullptr},
    {"AudioRingerModeVibrateCode", nullptr, AudioRingerModeVibrateCode, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioDeviceRoleInputCode", nullptr, AudioDeviceRoleInputCode, nullptr, nullptr, nullptr, napi_default, nullptr},
    {"AudioDeviceTypeWiredHeadphonesCode", nullptr, AudioDeviceTypeWiredHeadphonesCode, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioDeviceTypeBluetoothScoCode", nullptr, AudioDeviceTypeBluetoothScoCode, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioDeviceTypeBluetoothA2dpCode", nullptr, AudioDeviceTypeBluetoothA2dpCode, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioDeviceTypeMicCode", nullptr, AudioDeviceTypeMicCode, nullptr, nullptr, nullptr, napi_default, nullptr},
    {"AudioDeviceTypeUsbHeadsetCode", nullptr, AudioDeviceTypeUsbHeadsetCode, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioDeviceTypeDisplayPortCode", nullptr, AudioDeviceTypeDisplayPortCode, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioDeviceTypeRemoteCastCode", nullptr, AudioDeviceTypeRemoteCastCode, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioDeviceTypeUsbDeviceCode", nullptr, AudioDeviceTypeUsbDeviceCode, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioDeviceTypeAccessoryCode", nullptr, AudioDeviceTypeAccessoryCode, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioDeviceTypeHdmiCode", nullptr, AudioDeviceTypeHdmiCode, nullptr, nullptr, nullptr, napi_default, nullptr},
    {"AudioDeviceTypeLineDigitalCode", nullptr, AudioDeviceTypeLineDigitalCode, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioDeviceTypeHearingAidCode", nullptr, AudioDeviceTypeHearingAidCode, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioDeviceTypeNearlinkCode", nullptr, AudioDeviceTypeNearlinkCode, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioDeviceUsageMediaInputCode", nullptr, AudioDeviceUsageMediaInputCode, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioDeviceUsageMediaAllCode", nullptr, AudioDeviceUsageMediaAllCode, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioDeviceUsageCallOutputCode", nullptr, AudioDeviceUsageCallOutputCode, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioDeviceUsageCallInputCode", nullptr, AudioDeviceUsageCallInputCode, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioDeviceUsageCallAllCode", nullptr, AudioDeviceUsageCallAllCode, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioStreamEventRoutingChangedCode", nullptr, AudioStreamEventRoutingChangedCode, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioStreamInterruptForceCode", nullptr, AudioStreamInterruptForceCode, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioStreamInterruptShareCode", nullptr, AudioStreamInterruptShareCode, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioStreamInterruptHintNoneCode", nullptr, AudioStreamInterruptHintNoneCode, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioStreamInterruptHintResumeCode", nullptr, AudioStreamInterruptHintResumeCode, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioStreamInterruptHintPauseCode", nullptr, AudioStreamInterruptHintPauseCode, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioStreamInterruptHintStopCode", nullptr, AudioStreamInterruptHintStopCode, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioStreamInterruptHintDuckCode", nullptr, AudioStreamInterruptHintDuckCode, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioStreamInterruptHintUnduckCode", nullptr, AudioStreamInterruptHintUnduckCode, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioStreamInterruptHintMuteCode", nullptr, AudioStreamInterruptHintMuteCode, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioStreamInterruptHintUnmuteCode", nullptr, AudioStreamInterruptHintUnmuteCode, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioStreamReasonUnknownCode", nullptr, AudioStreamReasonUnknownCode, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioStreamReasonOldDeviceAvailableCode", nullptr, AudioStreamReasonOldDeviceAvailableCode, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioStreamReasonOldDeviceUnavailableCode", nullptr, AudioStreamReasonOldDeviceUnavailableCode, nullptr, nullptr,
     nullptr, napi_default, nullptr},
    {"AudioStreamReasonOverrodeCode", nullptr, AudioStreamReasonOverrodeCode, nullptr, nullptr, nullptr, napi_default,
     nullptr},
    {"AudioStreamReasonSessionActivatedCode", nullptr, AudioStreamReasonSessionActivatedCode, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioStreamReasonStreamPriorityChangedCode", nullptr, AudioStreamReasonStreamPriorityChangedCode, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioDeviceChangeTypeDisconnectCode", nullptr, AudioDeviceChangeTypeDisconnectCode, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioSessionStateChangeHintResumeCode", nullptr, AudioSessionStateChangeHintResumeCode, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioSessionStateChangeHintPauseCode", nullptr, AudioSessionStateChangeHintPauseCode, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioSessionStateChangeHintStopCode", nullptr, AudioSessionStateChangeHintStopCode, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioSessionStateChangeHintTimeOutStopCode", nullptr, AudioSessionStateChangeHintTimeOutStopCode, nullptr,
     nullptr, nullptr, napi_default, nullptr},
    {"AudioSessionStateChangeHintDuckCode", nullptr, AudioSessionStateChangeHintDuckCode, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioSessionStateChangeHintUnduckCode", nullptr, AudioSessionStateChangeHintUnduckCode, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"DeviceChangeRecommendToContinueCode", nullptr, DeviceChangeRecommendToContinueCode, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"DeviceChangeRecommendToStopCode", nullptr, DeviceChangeRecommendToStopCode, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioSessionStateChangedEventCode", nullptr, AudioSessionStateChangedEventCode, nullptr, nullptr, nullptr,
     napi_default, nullptr},
    {"AudioSessionStateChangedEventStateChangeHintCode", nullptr, AudioSessionStateChangedEventStateChangeHintCode,
     nullptr, nullptr, nullptr, napi_default, nullptr},
};

EXTERN_C_START
static napi_value Init(napi_env env, napi_value exports)
{
    napi_define_properties(env, exports, sizeof(desc) / sizeof(desc[0]), desc);
    return exports;
}
EXTERN_C_END

static napi_module demoModule = {
    .nm_version = 1,
    .nm_flags = 0,
    .nm_filename = nullptr,
    .nm_register_func = Init,
    .nm_modname = "entry",
    .nm_priv = ((void *)0),
    .reserved = {0},
};

extern "C" __attribute__((constructor)) void RegisterModule(void) { napi_module_register(&demoModule); }
